/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2012 Regents of the University of California
 */

#include <asm.h>
#include <csr.h>

/* maybe you need another stack for booting? */
.equ boot_stack_top_base, 0x50202000

.section ".entry_function","ax"
ENTRY(_start)
  /* TODO: */
  /* setup C environment for boot.c */
  la sp, 0x50300000
  /*csrw CSR_SSCRATCH, x0*/

  /* this should never return */
  /*传递参数，mhartid riscv_dtb*/
  addi a0, zero, 0
  addi a1, zero, 0
  call boot_kernel

loop:
  wfi
  j loop

END(_start)
